/*******************************************************************************
*  file    : testdataplugin.cpp
*  created : 07.07.2012
*  author  : Slyshyk Oleksiy (alex312@meta.ua)
*******************************************************************************/

#include "testdataplugin.hpp"
#include <QVector>

#ifndef M_PI
#define M_PI (3.1415926535897932384626433832795)
#endif

QString TestDataPlugin::name() const
{
    return QString("Test data plugin");
}

double TestDataPlugin::sampleRate() const
{
    return 8000.0;
}

QVector<std::complex<double> > TestDataPlugin::getData()
{
    QVector<std::complex<double> > res;
    for(int i = 0; i < 16000; ++i)
        {
            res.push_back(100 * sin( (390.0 *2.0*M_PI)*((double)i/8000.0) ));
        }
    return res;
}
